/* @(#)GSMarketInfoAddConfirmAction.java
 * 
 *  Project:GS
 *  
 *  Modify  Information:
 *  ===============================================
 *   Author          Date            Description
 *  -------------- ---------------  ---------------
 *  Jenny  Li      2006-5-26          新增
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 *
 */
package com.hitrust.gs.action;

import com.hitrust.gs.business.GSMarketInfoProcessor;
import com.hitrust.gs.form.GSMarketInfoAddForm;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;

/**
 * @author JennyLi
 *
 */
public class GSMarketInfoAddConfirmAction extends GSBaseAction {

    /* (non-Javadoc)
     * @see com.hitrust.gs.service.GSBaseAction#execute(com.hitrust.gs.service.GSBaseForm)
     */
    public String execute(GSBaseForm aForm) throws Exception {
        GSMarketInfoAddForm tForm = (GSMarketInfoAddForm)aForm;
        try{
            GSMarketInfoProcessor tMarketInfoProc = new GSMarketInfoProcessor();
            boolean tFlag = tMarketInfoProc.addMarketInfo(tForm);
            if(tFlag){
                tForm.getRequest().setAttribute("message","新增市场信息成功");
            }else{
                tForm.getRequest().setAttribute("message","新增市场信息失败");
            }
            tForm.getRequest().setAttribute("requery","true");
            tForm.getRequest().setAttribute("backstep", "0");
        }catch(Exception e){
            tForm.getRequest().setAttribute("window","true");
            throw e;
        }
        return GSBaseConstants.FORWARD_SUCCESS;
        
    }

}
